using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class FFRMap : EntityTypeConfiguration<FFR>
    {
        public FFRMap()
        {
            // Primary Key
            this.HasKey(t => t.FR_ID);

            // Properties
            this.Property(t => t.FR_Name)
                .HasMaxLength(50);

            this.Property(t => t.FR_mm)
                .HasMaxLength(20);

            this.Property(t => t.FR_TargetLesion)
                .HasMaxLength(50);

            this.Property(t => t.FR_Time)
                .HasMaxLength(50);

            this.Property(t => t.FR_PD)
                .HasMaxLength(20);

            this.Property(t => t.FR_UG)
                .HasMaxLength(20);

            this.Property(t => t.FR_FFR)
                .HasMaxLength(20);

            this.Property(t => t.FR_Remark)
                .HasMaxLength(200);

            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.OtherTargetText)
                .HasMaxLength(50);

            this.Property(t => t.FR_LesionTag)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("FFR");
            this.Property(t => t.FR_ID).HasColumnName("FR_ID");
            this.Property(t => t.FR_Name).HasColumnName("FR_Name");
            this.Property(t => t.FR_mm).HasColumnName("FR_mm");
            this.Property(t => t.FR_TargetLesion).HasColumnName("FR_TargetLesion");
            this.Property(t => t.FR_Time).HasColumnName("FR_Time");
            this.Property(t => t.FR_PD).HasColumnName("FR_PD");
            this.Property(t => t.FR_UG).HasColumnName("FR_UG");
            this.Property(t => t.FR_FFR).HasColumnName("FR_FFR");
            this.Property(t => t.FR_Remark).HasColumnName("FR_Remark");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.State).HasColumnName("State");
            this.Property(t => t.OtherTargetText).HasColumnName("OtherTargetText");
            this.Property(t => t.Target_ID).HasColumnName("Target_ID");
            this.Property(t => t.FR_NID).HasColumnName("FR_NID");
            this.Property(t => t.FR_LesionTag).HasColumnName("FR_LesionTag");
        }
    }
}
